<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
	class emp_register_model extends CI_Model
	{
		// login
		public function do_login($username,$password,$status)
		{
			$this->db->where('user_name',$username);
			$this->db->where('password',$password);
			$this->db->where('status',$status);
			$query = $this->db->get('employer');
			if($query->num_rows()>0)
			{
				foreach($query->result() as $row)
				{
					$newdata = array(
						'emp_id' => $row->id,
						'emp_user_name' => $row->user_name,
						'emp_email' => $row->email,
						'logged_in' => TRUE
					);
				}
				$this->session->set_userdata($newdata);
				return true;
			}else{
				return false;
			}
			
		}
		
		// get empl profile by email
		public function get_empprofile($emp_email)
		{
			$this->db->select('*');
			$this->db->from('employer');
			$this->db->where('email',$emp_email);
			$query = $this->db->get();
			$result = $query->result();
			return $result;
		}
		
	
	
	
	} // end class


?>